import './assets/main.css'

import {createApp} from 'vue'
import App from './App.vue'
// 引入pinia
import pinia from "@/stores";
// 引入路由
import router from '@/router'
// 引入全局样式
import "@/style/index.scss"
// 引入svg图标
import 'virtual:svg-icons-register';
//在main.ts中全局引入
import svgIcon from '@/components/svg-icon/index.vue';2
//引入路由鉴权
import '/src/permisstion.ts'
// 引入element-plus
import 'element-plus/dist/index.css'

import dialog from '@/components/dialog/index.vue'

const app = createApp(App)

app.use(router)
app.use(pinia)

app.component('svg-icon', svgIcon);
app.component('my-dialog', dialog);

app.mount('#app')

// 开发环境开启vue devtools
const win: any = window
//@ts-ignore
if (process.env.NODE_ENV === 'development') {

    if ('__VUE_DEVTOOLS_GLOBAL_HOOK__' in win) {

        win.__VUE_DEVTOOLS_GLOBAL_HOOK__.Vue = app

    }

}